Internet technology enables the delivery of high quality audio and video content to locations and devices previously beyond the reach of television, radio and other forms of audio and video distribution. This has lead to the development of many new applications and devices for distributing broadcast audio and video streams via the Internet. For example, it is now possible to receive video, such as television clips, on cellular telephones. Such technology has the potential to revolutionize the visual medium, television and the film industry. Thus, there is a growing need for applications that deliver broadcast streams to a wide range of devices via the Internet.
Applications that will receive a broadcast or multicast video stream via the Internet must establish a connection to the Internet that is tied to a source of the video stream. The standard interface for connecting to the Internet in modern operating systems is known as the Berkeley Sockets Application Programming Interface (API), also referred to as the BSD socket API. (BSD stands for Berkeley Software Distribution, which is sometimes referred to as Berkeley Unix). An API is a source code interface that a computer system or program library provides to support requests for standard services to be made of it by computer programs (applications). The Berkeley sockets API comprises a library of routines useful for developing computer networking applications in the C programming language. While the Berkeley socket API is not the only such API in use, most programming languages suitable for developing Internet applications use an interface that is similar in terms of the included routines and their functionality. Additionally, many programming languages have adopted a version of BSD socket APIs. Therefore, descriptions of APIs herein are based upon the format and functionality of BSD socket APIs.
In order for an application to receive a broadcast or multicast video stream via the Internet, a connection, referred to as a “socket,” to the source must be created. A socket is an end-point of an Internet connection between a client and a server. Creating a socket ensures that packets sent by the server will be delivered to the client application. To create a socket, an application calls the socket( ) API. When a socket is created in this manner, it is given an address family but not assigned to a particular local interface in the client device. Therefore, before a socket may accept incoming data from the server, it must be assigned to a particular local interface which will serve as the device interface with the Internet. One method of assigning a particular local address to a socket is accomplished by the bind( ) API.
For an application to listen to a broadcast or multicast stream, the application must either invoke an ioctl( ) or a socket_opt( ) call. When invoking either an ioctl( ) or a socket_opt( ) call, the specific interface on which the IP broadcast stream is to be received must be known. However, typical devices have a number of interfaces over which data may be received. Previously, in order to determine the particular local interface through which the IP data stream will be received, the application must perform a complex set of instructions. This added complexity leads to unnecessary program overhead, application development costs, and processing delay in establishing connections to a broadcast stream.